home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
Pakiet bezpieczenstwa
/
mini Pentoo LiveCD 2006.1
/
mpentoo-2006.1.iso
/
livecd.squashfs
/
usr
/
sbin
/
mo2dir
< prev
next >
Wrap
Text File
|
2006-05-11
|
821b
|
35 lines
#!/bin/bash
# convert .MO compressed file back into directory tree
#
# Author: Tomas M. <http://www.linux-live.org>
#
if [ ! -d "$2" ]; then
echo
echo "Convert .MO compressed module back into directory tree"
echo "usage: $0 source_file.mo existing_output_directory"
exit 1
fi
if [ -a ./liblinuxlive ]; then
. ./liblinuxlive
else
. /usr/lib/liblinuxlive || exit 1
fi
allow_only_root
TMPDIR=/tmp/mo2dir$$
mkdir -p $TMPDIR
mount_module "$1" "$TMPDIR" 2>/dev/null
if [ $? -ne 0 ]; then
echo "Error mounting module. Please make sure it's squashfs filesystem."
echo "If you are in unioned dir, try to move the module outside of the union"
echo "eg. to harddisk partition or /mnt/live/memory ... then try $0 again"
exit
fi
cp -R --preserve=all $TMPDIR/* "$2"
umount "$TMPDIR"
rmdir "$TMPDIR"